package br.odb.bzk3.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import br.odb.bzk3.android.EngineActivity;
import br.odb.bzk3.android.R;
import br.odb.utils.Utils;

public class AppStart extends Activity implements OnClickListener  {
	private Button btn;
	private Spinner cbo;

	// ------------------------------------------------------------------------------------------------------------
	// /<tmp>
	

	// /</tmp>
	// ------------------------------------------------------------------------------------------------------------
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		Utils.eqFloat( 1.0f, 1.5f );
		br.odb.utils.math.Vec3 v = new br.odb.utils.math.Vec3( 0.0f, 0.0f, 0.0f );
		setContentView( R.layout.main );

		// /<tmp>
		TextView tv;
		cbo = (Spinner) findViewById( R.id.spnLevels );

		ArrayAdapter<Object> spinnerArrayAdapter = new ArrayAdapter<Object>(
				this, android.R.layout.simple_spinner_dropdown_item,
				new String[] { "Life on Lies - level 1 - new", "Life on Lies - level 1 - old" });
		cbo.setAdapter(spinnerArrayAdapter);

		btn = (Button) findViewById( R.id.btPlay );
		btn.setOnClickListener(this);

		// /</tmp>

	}

	// ------------------------------------------------------------------------------------------------------------


	@Override
	public void onClick(View arg0) {

		EngineActivity.selected = cbo.getSelectedItemPosition();
		startActivity( new Intent( this, EngineActivity.class ) );
	}
}
